package entity

import "encoding/json"

type FeePlan struct {
	Id        int64           `gorm:"column:id;primary_key;comment:主键ID" json:"id"`
	Name      string          `gorm:"column:name;type:varchar(255);comment:套餐名称" json:"name"`
	Type      int             `gorm:"column:type;type:smallint default 1 not null;comment:套餐类型(1:按钮续费,2:连续包年)" json:"type"`
	Enable    int             `gorm:"column:enable;type:smallint default 1 not null;comment:是否启用(1:启用,0:禁用)" json:"enable"`
	Packs     json.RawMessage `gorm:"column:packs;type:json;comment:套餐内容json格式,注意money的单位是分" json:"packs"`
	CreatedAt int64           `gorm:"column:created_at;type:bigint;comment:创建时间" json:"created_at"`
	UpdatedAt int64           `gorm:"column:updated_at;type:bigint;comment:更新时间" json:"updated_at"`
}

func (f *FeePlan) TableName() string {
	return "fee_plan"
}
